Skip to content

Refactor HttpClient-based transports to Publisher-based approach - #1079

Open
Kehrlann wants to merge 4 commits into
mainfrom
dgarnier/issue-620-refactor-http-client-chains
Open

Refactor HttpClient-based transports to Publisher-based approach#1079
Kehrlann wants to merge 4 commits into
mainfrom
dgarnier/issue-620-refactor-http-client-chains

Conversation

@Kehrlann

@Kehrlann Kehrlann commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Refactor HttpClient use to avoid capturing the sseSink that leads to leaking the httpClient reference due to a cycle (see #620).
This rewrites the HttpClient streaming support from a BodySubscriber pushing messages to a Publisher-based approach.

This avoids the HttpClient cyclic reference we had in the previous implementation. The tradeoff is that we have to perform line parsing manually with a Utf8LineDecoder we maintain.
We can batch this rework with performance fixes reading large SSE events (see #1042)

Fixes #1042
Fixes #620

(Rebased @chemicL 's work on issue #620)

@Kehrlann Kehrlann added this to the 2.1.0 Planning milestone Aug 7, 2026
@Kehrlann Kehrlann self-assigned this Aug 7, 2026
@Kehrlann Kehrlann added area/client P1 Significant bug affecting many users, highly requested feature area/transport do not merge labels Aug 7, 2026
@Kehrlann
Kehrlann force-pushed the dgarnier/issue-620-refactor-http-client-chains branch from 16fee90 to 30dc4d3 Compare August 7, 2026 16:14
@Kehrlann
Kehrlann force-pushed the dgarnier/issue-620-refactor-http-client-chains branch from 30dc4d3 to bf47603 Compare August 27, 2026 11:49
chemicL and others added 4 commits August 31, 2026 17:11
…leaking the httpClient reference due to a cycle

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
Signed-off-by: Dariusz Jędrzejczyk <2554306+chemicL@users.noreply.github.com>
Fixes #1042

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann
Kehrlann marked this pull request as ready for review August 31, 2026 15:11
@Kehrlann
Kehrlann force-pushed the dgarnier/issue-620-refactor-http-client-chains branch from b897c12 to bbb3330 Compare August 31, 2026 15:11
@Kehrlann Kehrlann changed the title [WIP] Refactor HttpClient use to avoid leaking references Refactor HttpClient-based transports Aug 31, 2026
@Kehrlann Kehrlann changed the title Refactor HttpClient-based transports Refactor HttpClient-based transports to Publisher-based approach Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client area/transport do not merge P1 Significant bug affecting many users, highly requested feature

Projects

None yet

2 participants